<?php 
	$html->css("add", null, array("inline"=>false));
	$html->css("jquery-ui", null, array("inline"=>false));
	$html->script("tiny_mce/tiny_mce",false); 
	$html->script("add",false); 
	$html->script("jquery-ui",false); 
?>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "simple"
	}); 
</script>
<div id="postOuter">
	<?php echo $form->create('Post',array('action'=>'add'));?>
	<div id="left">
		<h2> Add A New Post</h2>
		<fieldset>
			<legend>Add Post</legend>
			<?php
				echo $form->input('Title',array('label'=>'Title(optional)'));
				echo $form->input('content');
				echo $form->submit('Creat Post');		
			?>
		</div>
		<div id="sideBar">
			<?php
				$option = array();
				foreach($blog as $everyBlog){
					$option[$everyBlog['id']] = $everyBlog['title'];
				}
				echo $form->input('Post to', array('options' => $option));
				echo $form->input('Publish', array('options' => array(
												'published'=>'Published',
												'draft'=>'Draft'
												)));
				echo $form->input('post_time',array('class'=>'date','type'=>'text'));
				echo $form->input('tags');
			?>
			<div id="tagsShow">
				<span>
				</span>
				<input id="inputEditor" type="text">
			</div>	
			<?php
				echo $form->input('source_url');				
				echo $form->input('custom_url');
			?>
		</div>
		<div class="clear"></div>
		<?php echo $form->end(); ?>
	</filedset>
</div>